module.exports = class extends think.Model {
	selectPatientByOpenId(openId){
		return this.where({openid:openId}).find();
	}

	addPatient(data){
		return this.add(data);
	}

	updatePatientByOpenId(openId,data){
		return this.where({openid:openId}).update(data);
	}

    async updateServiceMsgByOpenId(openId,data){
        let result = await this.where({openid:openId}).update(data);
        return result;
    }

    async getServiceMsgByOpenId(openId){
        let serviceMsg = await this.where({openid:openId}).find();
        return serviceMsg.serviceMsg;
    }
};
